export const CafeTextFilter={
    methods:{
        processCafeTextFilter:function (cafe,text) {
            //名称,地址,城市是否匹配
            if(text.length>0){
                if(cafe.name.toLowerCase().match('[^,]*' + text.toLowerCase() + '[,$]*')
                    ||cafe.location_name.toLowerCase().match('[^,]*' + text.toLowerCase() + '[,$]*')
                    ||cafe.address.toLowerCase().match('[^,]*' + text.toLowerCase() + '[,$]*')
                    ||cafe.city.toLowerCase().match('[^,]*' + text.toLowerCase() + '[,$]*')){
                    return true;
                }else {
                    return false;
                }
            }else {
                return true;
            }
        }
    }
};
